High throughput decoding of variable length data symbols

ABSTRACT

A method of decoding data includes: receiving an encoded data stream transmitted as a plurality of variable length symbols; dividing the data stream into a sequence of blocks, each block having a sequence of adjacent bit positions starting a first bit position and ending with a last bit position; pre-processing each block prior to fully decoding each block, wherein pre-processing includes, for each block, selecting a bit position in a current block and determining a starting position of a first symbol in an adjacent block based on the selected bit position, wherein determining is initially performed for the last bit position in the current block, and is repeated sequentially for each preceding bit position through and including the first bit position; and fully decoding each block by decoding a first block starting at the first bit position and decoding each adjacent block starting at the starting position.

BACKGROUND

Some coding and/or compression algorithms transmit data in encodedstreams that are represented by symbols having varying lengths. Forexample, huffman encoded files include symbol lengths that can vary from1 bit to 28 bits long. Such variable length symbol encoding schemestypically require that encoded data be decoded sequentially, which cansignificantly restrict throughput.

SUMMARY

Exemplary embodiments include a method of decoding data. The methodincludes: receiving a data stream, the data stream encoded by anencoding algorithm and transmitted as a plurality of variable lengthsymbols; dividing the data stream into a sequence of blocks, each blockhaving a sequence of adjacent bit positions starting a first bitposition and ending with a last bit position; pre-processing each blockprior to fully decoding each block, wherein pre-processing includes, foreach block, selecting a bit position in a current block and determininga starting position of a first symbol in an adjacent block based on theselected bit position, wherein determining is initially performed forthe last bit position in the current block, and is repeated sequentiallyfor each preceding bit position through and including the first bitposition; and fully decoding each block by decoding a first blockstarting at the first bit position and decoding each adjacent blockstarting at the starting position.

Other exemplary embodiments include an apparatus for decoding data thatincludes a processing system including a pre-processing engine and adecoding pipeline. The processing system is configured to perform amethod including: receiving a data stream, the data stream encoded by anencoding algorithm and transmitted as a plurality of variable lengthsymbols; dividing the data stream into a sequence of blocks, each blockhaving a sequence of adjacent bit positions starting a first bitposition and ending with a last bit position; pre-processing each blockprior to fully decoding each block by the pre-processing engine, whereinpre-processing includes, for each block, selecting a bit position in acurrent block and determining a starting position of a first symbol inan adjacent block based on the selected bit position, whereindetermining is initially performed for the last bit position in thecurrent block, and is repeated sequentially for each preceding bitposition through and including the first bit position; and inputting thedata stream into the pipeline and fully decoding each block by decodinga first block starting at the first bit position and decoding eachadjacent block starting at the starting position.

Further exemplary embodiments include a computer program product fordecoding data and including a tangible storage medium readable by aprocessing circuit and storing instructions for execution by theprocessing circuit for performing a method. The method includes:receiving a data stream, the data stream encoded by an encodingalgorithm and transmitted as a plurality of variable length symbols;dividing the data stream into a sequence of blocks, each block having asequence of adjacent bit positions starting a first bit position andending with a last bit position; pre-processing each block prior tofully decoding each block, wherein pre-processing includes, for eachblock, selecting a bit position in a current block and determining astarting position of a first symbol in an adjacent block based on theselected bit position, wherein determining is initially performed forthe last bit position in the current block, and is repeated sequentiallyfor each preceding bit position through and including the first bitposition; and fully decoding each block by decoding a first blockstarting at the first bit position and decoding each adjacent blockstarting at the starting position.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 illustrates a block diagram of a system 100 for instructionbalancing within a multi-threaded processor through instructionuncertainty;

FIG. 2 illustrates a flow chart for an embodiment of a method ofdecoding received data;

FIG. 3 illustrates an example of a portion of an encoded data stream

FIG. 4 illustrates a block diagram of an embodiment of an encoded datapre-processing system; and

FIG. 5 illustrates a block diagram of an embodiment of an encoded datapre-processing system

DETAILED DESCRIPTION

There are provided systems and methods for facilitating decompressionand decoding of received data. In exemplary embodiments, the systems andmethods include high-throughput decoding of multiple variable lengthsymbols.

In one embodiment, a method performed by a suitable machine or processorincludes dividing received encoded data into sequential fixed lengthblocks (e.g., 8 bytes per line). The data may be encoded via an encodingscheme that specifies symbols having variable lengths. For example, eachblock is a segment of an encoded data stream having a fixed number ofbits. The machine pre-processes each block without any prior informationabout the starting position of the first symbol in each block.Pre-processing includes calculating, for each possible starting positionin a current block (e.g., each possible bit position), all possiblestarting positions in the next block based on the symbols provided bythe coding scheme. For example, the machine selects a possible startingposition and determines what the starting position in the next blockwould be if a symbol starts at the selected starting position. In oneembodiment, this determination is performed sequentially starting fromthe last position to the first position of the current block.

The results of the pre-processing may be stored in look-up tables orother suitable data structures to allow one or more processors toquickly determine the starting position of each block so that the datastream can be decoded in parallel. In one embodiment, the processor cancompute in one clock cycle the starting position of the first symbol inthe next block, given the starting position of the first symbol in thecurrent block. This allows a high-bandwidth pipelined decompressorimplementation.

The systems and methods described herein facilitate efficient decodingand/or decompression. The systems and methods can be embodied insoftware and/or hardware implementations.

For example, compression/decompression can be offloaded to improveperformance. The systems and methods allow offloaded decompressionhardware to perform at levels that are comparable to or exceed processorperformance by maintaining a throughput in which multiple symbols aredecoded per cycle, e.g., decoded in parallel.

FIG. 1 illustrates a block diagram of a processing system 10 forperforming various processes including embodiments described herein. Themethods described herein can be implemented in hardware, software (e.g.,firmware), or a combination thereof. In an exemplary embodiment, themethods described herein are implemented in hardware as part of themicroprocessor of a special or general-purpose digital computer, such asa personal computer, workstation, minicomputer, or mainframe computer.The system 100 therefore includes general-purpose computer 12.

In an exemplary embodiment, in terms of hardware architecture, as shownin FIG. 1, the computer 12 includes a processor 14, memory 16 coupled toa memory controller 18, and one or more input and/or output (I/O)devices 20, 22 (or peripherals) that are communicatively coupled via alocal input/output controller 24. The input/output controller 24 can be,for example but not limited to, one or more buses or other wired orwireless connections, as is known in the art. The input/outputcontroller 24 may have additional elements, which are omitted forsimplicity, such as controllers, buffers (caches), drivers, repeaters,and receivers, to enable communications. Further, the local interfacemay include address, control, and/or data connections to enableappropriate communications among the aforementioned components.

The processor 14 may be a hardware device for executing software,particularly that stored in memory 16. The processor 14 can be anycustom made or commercially available processor, a central processingunit (CPU), an auxiliary processor among several processors associatedwith the computer 12, a semiconductor based microprocessor (in the formof a microchip or chip set), a macroprocessor, or generally any devicefor executing instructions.

The memory 16 can include any one or combination of volatile memoryelements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM,etc.)) and nonvolatile memory elements (e.g., ROM, erasable programmableread only memory (EPROM), electronically erasable programmable read onlymemory (EEPROM), programmable read only memory (PROM), tape, compactdisc read only memory (CD-ROM), disk, diskette, cartridge, cassette orthe like, etc.). Moreover, the memory 16 may incorporate electronic,magnetic, optical, and/or other types of storage media. Note that thememory 16 can have a distributed architecture, where various componentsare situated remote from one another, but can be accessed by theprocessor 14. Additional storage devices 17 may be included as desired.

The instructions in memory 16 may include one or more separate programs,each of which comprises an ordered listing of executable instructionsfor implementing logical functions. In the example of FIG. 1, theinstructions in the memory 16 include a suitable operating system (OS)26. The operating system 26 essentially controls the execution of othercomputer programs and provides scheduling, input-output control, fileand data management, memory management, and communication control andrelated services.

In an exemplary embodiment, input devices such as a keyboard 28 andmouse 30 can be coupled to the input/output controller 24. Other outputdevices such as the I/O devices 20, 22 may include input devices, forexample but not limited to a printer, a scanner, microphone, and thelike. Finally, the I/O devices 20, 22 may further include devices thatcommunicate both inputs and outputs, for instance but not limited to, anetwork interface card (NIC) or modulator/demodulator (for accessingother files, devices, systems, or a network), a radio frequency (RF) orother transceiver, a telephonic interface, a bridge, a router, and thelike. The system 10 can further include a display controller 32 coupledto a display 34. In an exemplary embodiment, the system 10 can furtherinclude a network interface 36 for coupling to a network 38 forcommunication between the computer 12 and any external server, clientand the like.

When the computer 12 is in operation, the processor 14 is configured toexecute instructions stored within the memory 16, to communicate data toand from the memory 16, and to generally control operations of thecomputer 12 pursuant to the instructions.

The processing system 10, computer 12, I/O devices 20, 22 and/or othersuitable processing devices or processors are configured to receive anddecode data that may be received in a compressed format. In oneembodiment, the data is received as an encoded data stream havingvariable length portions of compressed data. The encoded data stream isdecoded by a processing device or processor so that the original datathat was compressed can be processed. The encoded data stream may betransmitted by one or more other processing systems or computers incommunication with the computer 12, e.g., via one or more networks 38.

A variable length encoded data stream may be encoded using any suitableencoding algorithm that generates variable length symbols to encodeoriginal non-encoded data. The term “symbol” as it is used herein withregard to the encoded data stream refers to an encoding representationin the encoded data stream where each symbol may be decoded/decompressedto create one or more bytes or groups of original data (i.e., data priorto encoding). For a given compression algorithm, the data may berepresented by any number of symbols, some of which have differentlengths (e.g., number of bits) and/or are associated with differentalphabets or other symbol groups.

Some exemplary compression algorithms utilize a DEFLATE algorithm toencode data into symbols. Other exemplary algorithms include Lempel-Zivalgorithms and huffman coding algorithms. Examples of data formats thatutilize variable length compression include .zip, .gzip and .gifformats. It is noted that the embodiments are not limited to use withthe compression algorithms/formats described herein, and can be usedwith any encoding and/or compression scheme that generates variablelength symbols.

Typically, variable length encoded data streams do not lend themselvesto parallel decoding operations, i.e., a processor or data processingsystem is not able to decode portions of the data stream in parallel.This is because there are no byte alignment markers in the data streamand thus, it cannot be determined from the data stream where one portionof data starts and ends and another portion of data starts and ends. Asa result, typical methods for decompression are not capable ofprocessing in parallel, and thus use a sequential decoding operationwhich limits the throughput and speed by which the decoding of thevariable length encoded data stream may be accomplished.

For example, in a dynamic huffman encoded file, symbol lengths vary from1 bit to 28 bits long. Because they consist of symbols of varyinglength, conventional processes for decoding these files are inherentlysequential, as knowledge of where a given symbol starts requires thedecoding of all previous symbols.

In addition, compression formats that utilize adaptive or dynamichuffman coding increase the difficulty in decoding. Static huffmancoding typically provides a limited number of codes or symbols, and alimited difference in length between the shortest and longest possiblecodes. Dynamic huffman coding is not so limited and thus furtherconstrains potential decompression techniques.

Embodiments of systems and methods described herein address this problemand have benefits and technical effects that include providing anefficient mechanism for processing coded data and/or for paralleldecoding of variable symbol length data streams. In one embodiment, aprocessor (e.g., in the system 10) is configured to divide encoded inputdata into fixed length blocks (e.g. 8 bytes per block), and pre-processeach block without any information about the starting position of thefirst symbol. After pre-processing, for each block of the encoded data,the processor can compute in one clock cycle the starting position ofthe first symbol in the next block given the starting position of thefirst symbol in a currently selected or current block. This allows forhigh-bandwidth pipelined decompressor implementations.

As described herein, a “block” refers to a selected segment or line ofan encoded data stream having a fixed length, e.g., a fixed number ofbits or bytes. The block length can be based on any suitable criteria,e.g., the amount of data that the processor can receive or process inone clock cycle. A “current block” or “selected block” refers to theblock that is currently being processed or pre-processed as describedherein. A “next block” refers to the block of data that immediatelyfollows the current block in the encoded data stream.

Referring to FIG. 2, an embodiment of a method 40 of pre-processing anddecoding and/or decompressing variable symbol length data streams isshown. The method 40 includes one or more stages 41-45. In oneembodiment, the method includes the execution of all of the stages 41-45in the order described. However, certain stages may be omitted, stagesmay be added, or the order of the stages changed. The method 40 may beperformed using components of the system 10, but is not so limited, andcan be used in conjunction with any suitable processing device or systemand any suitable hardware and/or software configuration.

In the first stage 41, an encoded data stream is received by aprocessing device, e.g., the system 10 and/or an I/O device 20, 22. Inone embodiment, the encoded data stream includes encoded symbolsrepresenting a string of original data (e.g., text characters). Forexample, the encoded data stream is a set of data encoded in one or more.gzip files.

In the second stage 42, the processing device divides the received datastream into fixed length blocks (e.g., 8 bytes per block). In oneembodiment, the length of each block is selected to correspond to theamount (e.g., number of bytes) of received data that is desired to beoutput for each processor clock cycle. The blocks may all have an equallength or be of varying lengths.

Because the symbols in the received data stream do not have a fixedlength, the starting position of the first symbol in each blocksubsequent to the first block is not known prior to decoding. In someblocks, a symbol may spill over from a current block into the nextblock, causing the starting position of the first symbol of the nextblock to be other than the first position of the next block. A “startingposition” of a symbol refers to the (typically left-most) position atwhich a symbol begins. The “position” in a stream or block refers to theposition of a portion of data (e.g. a bit, byte or symbol) in a streamrelative to other portions in the stream. Positions progress from afirst or earliest position referring to data that is processed earliest,to a last or latest position referring to data that is processed last(e.g., data in the last position of a block is the last is processedlast wen the block is decoded). In order to allow for parallelprocessing of each encoded data block, the starting position of thefirst complete symbol in each block is identified as described below.

An example of a portion of a data stream 50 that has been divided intoequal-length blocks is shown in FIG. 3. The stream 50 includes a firstblock 52 and a second block 54 immediately following the first block 52.The first block 52 includes Symbols 1-4. In the first block 52, thestarting position of the first symbol (Symbol 1) is the first orearliest bit position 56. Because the total length of Symbols 1-4exceeds the length of the first block 52, Symbol 4 spills over into thesecond block 54. The first symbol of the second block 54 (Symbol 5) andthe first symbol starting point 58 (first position of Symbol 5) is thusoffset and begins at a position after the beginning of the second block54. The starting position 58 of the Symbol 5 immediately follows thelast position 60 of Symbol 4. In order to be able to process both blockswithout waiting for decoding of the first block to complete, thestarting position of symbol 5 should be known.

In the third stage 43, each block is pre-processed (i.e., processedprior to fully decoding the data in the block) to calculate possiblestarting positions of each block based on possible symbols and based onpossible starting positions of an adjacent previous block. Each block ispre-processed so that if the starting position of the first symbol in ablock is known, the starting position of the first complete symbol inthe next block (i.e., adjacent block located after the block) can bedetermined rapidly (e.g., in one clock cycle).

In one embodiment, for each block (starting at the first block in thedata stream), all possible starting positions are evaluated, startingfrom the last possible starting position (e.g., the last bit in theblock) and proceeding sequentially from the last possible startingposition to the first possible starting position. This evaluationincludes, for each possible position, determining what the startingposition in the next block would be if a given symbol was to start atthe bit position. This determination includes identifying the symbol (orin some cases, multiple possible symbols) that would start at thatposition by decoding some number of bits. If the number of bits does notindicate a valid symbol, the current bit position is disregarded.

Evaluation of each possible position is performed for a symbolidentified for that position or, if multiple symbols are identified,performed for each symbol. The results are recorded in a look-up table(or other suitable data structure) that is indexed for each bit positionassociated with a block.

To illustrate this embodiment, an example is discussed with reference toa block having “n” bit positions. The compression or coding algorithm isa variable symbol length algorithm that specifies a number “M” ofsymbols referred to as S1, S2, S3 . . . SM, each having a defined length(e.g., in bits).

In this example, the first block is selected and pre-processed. Startingwith bit position n, the processing device uses information from thedecoding algorithm to determine what the starting position of the firstsymbol in the next block (adjacent block following the first block)would be. A number of bits starting at bit position n is inspected andthe symbol is identified, e.g., symbol S1. The first symbol startingposition of the next block is calculated by adding the number of bitsdefined for the symbol S1 to the bit position n to find the startingposition in the next block. The result is saved in a look-up tableindexed to this block and position. If multiple symbols could start atposition n, the starting position is again calculated for additionalpossible symbols until all possible starting positions in the next blockare found that are associated with bit position n in the first block.The processing device then proceeds to the bit position immediatelypreceding the bit position n. The symbol that would start at position“n−1” is identified, e.g., symbol S2, the number of bits correspondingto the length of S2 is added to the bit position n to find the startingposition, and the starting position is stored in the look-up table.

The processing device proceeds sequentially in this manner through allof the possible bit positions of the first block until the first bitposition in the first block is reached and pre-processed.

In some instances, a symbol applied to a possible starting position doesnot spill over, but rather ends within the current block. In suchinstances, the starting position of the next symbol would not occur inthe next block, but would rather occur in the current block. To accountfor such instances, in one embodiment, the third stage 43 includesdetermining the length of a symbol (“the current symbol”) that wouldbegin at a possible starting position, and determining the position atwhich the following symbol would start by adding the length of thecurrent symbol to the current starting position. If the startingposition of the following symbol is in the next block, this result isrecorded in a look-up table at an index given by this bit position. Ifthe starting position of the following symbol is in the current block,the starting position in the next block is determined by looking up fromthe look-up table the entry indexed to the starting position of thefollowing symbol in the current block, and recording that startingposition in an entry associated with the current starting position.

In the fourth stage 44, the first symbol in the first starting positionof the first block is determined. This information may be retrieved fromcoding information provided by the transmitting entity. Using theknowledge of the first symbol, the first starting position in the nextadjacent block is rapidly determined (e.g. once per clock-cycle in ahardware implementation). The first starting position in the next blockmay be determined by looking up the first starting position in a look-uptable indexed to the first block.

The processing device then proceeds to the second block, and determinesthe starting position of the third block using the starting position ofthe second block determined above. The starting position of the thirdblock may be determined by looking up the starting position of the thirdblock in an appropriate look-up table. The starting position of eachsucceeding block is determined in this way until all of the startingpositions are known.

In the fifth stage 45, the data is fully decoded by, e.g., feeding eachblock into a pipeline to fully decode the symbols, starting from thepre-determined position of the first symbol in each line. In oneembodiment, each block is aligned so that the starting position in eachblock is used to decode the symbols in each block, and two or more ofthe blocks are input into parallel pipelines so that the blocks can bedecoded in parallel.

FIGS. 4 and 5 show examples of a processing device embodied as one ormore pre-processing engines. FIG. 4 shows an exemplary pre-processingengine 70 configured to perform the method 40. In these examples, thepre-processing engine 70 is embodied in a hardware configuration,however the engine could be otherwise embodied, e.g., as software. Inone example, the pre-processing engine(s) and other components such asencoders and/or decoders are embodied in an I/O device or devices 20, 22shown in FIG. 1.

Referring to FIG. 4, the pre-processing engine 70 includes a shiftregister 72, a symbol decoder 74 and a memory 76. In this example, theengine 70 is configured to pre-process 8-byte data blocks and the memory76 includes a SRAM (64 rows, 6 columns), a 79-bit shift register 72 andtwo small (2 way, 6 bit) multiplexors 78. Although a single engine isshown for preprocessing a block, the engine can be pipelined as desired.The pre-processing engine 70 in this example processes one bit positionper cycle.

The engine 70 performs the pre-processing by receiving the first blockas “data in” to the shift register 72. The last position is input to thedecoder 74 as “input data”, and the decoder identifies the symbol thatstarts at this position and determines the output length for the symbol.The symbol may be identified by fully or partially decoding the symbol,e.g., by inspecting the bit progression starting at the position. One ormore of the bits in the bit progression are used to identify the symbolbased on the coding scheme. The “output length” and the current bitposition (the last bit position of the first block at this point of thepre-processing) are input to an addition logical unit 80, which in turnwrites the starting position data to the SRAM 76 along with a writeaddress (wa) input indicating the current bit position. This informationis stored in an indexed look-up table. The engine then decrements thecurrent position of the first block to the immediately preceding bitposition, shifts the block in the register 72 accordingly, and repeatsthe pre-processing. The engine 70 repeats the computation for eachpreceding possible starting position until the beginning position of thefirst block is reached.

After determining the next block starting position for each bit positionin the current block, the pre-processing engine 70 is able to output astarting position of the next block based on an input that specifies thestarting position of the current block. For example, the engine 70receives the starting position of the first block as a “start in” input,which may be the first bit position or could be a different bitposition. In response to the “start in”, the engine 70 looks up thecorresponding starting position for the next block in the look-up tableand outputs the starting position as “start out”. The “start out” may beprovided as a “start in” input to another engine or processor thatdecodes the next block based on the starting position.

As shown in FIG. 3, the pre-processing engine 70 only requires onelook-up table per block. However, the engine is not so limited, asmultiple blocks may be included to correspond to multiple symbols, e.g.,if more than one symbol could start at a given bit position (e.g.,symbols from multiple alphabets).

The engine 70 then receives the second block and pre-processes thesecond block. The engine 70 pre-processes each block in order, at a rateof, e.g., one block every 64 cycles. When the pre-processing iscomplete, all possible starting positions for each block are stored inassociated look-up tables.

In one embodiment as shown in FIG. 4, for each bit position, the decoder74 receives the input data and computes where the next symbol wouldstart if a symbol were to start at this bit location. If the answer liesin the next block, i.e., the starting position occurs in the next block,the answer is recorded in the SRAM using the current bit position as awrite address. If the answer lies in the current block, the starting bitposition of the next symbol is used as an address to look up the nextblock starting position from the SRAM, and the resulting next blockstarting address is stored using the current bit position as a writeaddress.

When done, the SRAM contains, for each possible starting position of asymbol, the starting location of the first symbol in the next line werethis line to contain a symbol starting at that bit position. As a resultof the pre-processing, if the starting position of the first symbol inthis block is provided, the question of “where does the next line start”can be quickly answered (e.g., in one clock cycle) by looking up theanswer in the SRAM.

In one embodiment, multiple pre-processors are combined to increasethroughput. FIG. 5 shows an example of a pre-processing system 90 thatincludes multiple pre-processors 70 in a pipeline. The configuration ofthis pipeline and the number and configuration of the pre-processorsdescribed in this embodiment are exemplary, as any suitable processingdevices capable of performing the methods described herein may be usedin any suitable pipeline configuration. In one example, the blocks aredivided into 64-bit lengths, each pre-processor 70 has 64 states andprovides an output of 6 bits, requiring only one small multiplexer 92(e.g., 64 way, 6 bit multiplexer).

In this embodiment, the system 90 has n pre-processors 70, each of whichaccepts new data every n cycles (where n is the block size), so that thecombination can accept one block per cycle. For example, for 64-bitblocks, the system includes 64 pre-processors. Each pre-processorprovides a “start out” output as described with reference to FIG. 4. Thestart-out is output from a pre-processor 70 and indicates the startingposition of the next block for a bit of the current block. The output isprovided as a “start in” input to the immediately followingpre-processor, which uses the start in and processes the next blockusing the start-in as a starting position.

For example, for a data stream having four blocks, shown as blocks B1-4,the processing system 90 may use four pre-processors 70, shown in FIG. 5as P1-P4. The blocks B1, B2, B3 and B4 are input to the pre-processorsP1, P2, P3 and P4 respectively. Each pre-processor pre-processes itsrespective block and generates at least one look-up table. Whenpre-processing is complete, at a first clock cycle, P1 receives astarting bit position of the first block B1 as “start-in-first” andprovides a starting position output “start-out” to the multiplexer(“mux”) 92 and to P2. At the next clock cycle (a second clock cycle), P2receives the starting position as a “start-in” input and outputs a“start-out” that indicates the starting position for block B3. At thethird clock cycle, P3 receives the B3 starting position from P2 andoutputs the starting position of B4. By the fourth clock cycle, all ofthe pre-processors have received their respective starting points. Thisprocess continues for any number of subsequent processors and/or maycycle back to P1 for processing of further block. In this way, all ofthe starting positions of all the block can be determined at a rate ofone block per cycle.

In one embodiment, in addition to symbol length, an encoding scheme mayprovide additional symbol characteristics. For example, some codingalgorithms such as .gzip include symbols from different alphabets. Inthis embodiment, the pre-processing of stage 43 includes the additionalsteps of pre-processing each block so that if the position and alphabet(or other characteristic) of the starting symbol of each block is known,the starting position and alphabet of the starting symbol of the nextblock can be determined rapidly.

For example, starting with the last bit position in the block, andrepeating for each bit position until the first bit position in theblock, the processing device determines the starting position and thealphabet of the first symbol in the next block for a given symbol. Thestarting position and alphabet are recorded in, e.g., a look-up table.The length and alphabet of the symbol can be determined by partially orfully decoding the symbol.

In one embodiment, determining the starting position of the next blockincludes adding the length of the current symbol to the current bitposition, and determining the alphabet of the next symbol based on rulesprovided by the encoding scheme, e.g., by the grammar of the type ofstream being decoded. If the starting position of the next symbol is inthe current block, the starting position of the next symbol is read froma look-up table indexed to that starting position, and the startingposition of the next block is stored from the table entry. If thestarting position of the next symbol is in the next block, recordingthis result in the table at an index given by this bit position.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon. Anycombination of one or more computer readable medium(s) may be utilized.The computer readable medium may be a computer readable signal medium ora computer readable storage medium.

A computer readable storage medium may be, for example, but not limitedto, an electronic, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, or device, or any suitable combinationof the foregoing. More specific examples (a non-exhaustive list) of thecomputer readable storage medium would include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing. In the context of this document,a computer readable storage medium may be any tangible medium that cancontain, or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of onemore other features, integers, steps, operations, element components,and/or groups thereof.

The flow diagrams depicted herein are just one example. There may bemany variations to this diagram or the steps (or operations) describedtherein without departing from the spirit of the invention. Forinstance, the steps may be performed in a differing order or steps maybe added, deleted or modified. All of these variations are considered apart of the claimed invention.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

1-10. (canceled)
 11. An apparatus for decoding data, comprising: aprocessing system including a pre-processing engine and a decodingpipeline, the processing system configured to perform a methodincluding: receiving a data stream, the data stream encoded by anencoding algorithm and transmitted as a plurality of variable lengthsymbols; dividing the data stream into a sequence of blocks, each blockhaving a sequence of adjacent bit positions starting a first bitposition and ending with a last bit position; pre-processing each blockprior to fully decoding each block by the pre-processing engine, whereinpre-processing includes, for each block, selecting a bit position in acurrent block and determining a starting position of a first symbol inan adjacent block based on the selected bit position, whereindetermining is initially performed for the last bit position in thecurrent block, and is repeated sequentially for each preceding bitposition through and including the first bit position; and inputting thedata stream into the pipeline and fully decoding each block by decodinga first block starting at the first bit position and decoding eachadjacent block starting at the starting position.
 12. The apparatus ofclaim 11, wherein the encoding algorithm is a compression algorithm, anddecoding includes expanding data represented by each symbol to recreatean original data stream.
 13. The apparatus of claim 11, whereindetermining the starting position includes identifying a symbol anddetermining the starting position based on a length of the symbol. 14.The apparatus of claim 11, wherein determining the starting positionincludes storing the starting position in a table indexed to the currentblock and the selected bit position.
 15. The apparatus of claim 13,wherein determining the starting position includes: determining thelength of the identified symbol that would begin at the selected bitposition; calculating a position of a following symbol by adding thelength of the identified symbol to the selected bit position.
 16. Theapparatus of claim 15, wherein calculating the starting positionincludes: responsive to the position of the following symbol being inthe adjacent block, recording the position as the starting position inthe table; and responsive to the position of the following symbol beingin the selected block, reading the starting position of the first symbolin the next block from an entry in the table corresponding to theposition, and recording the starting position in the table.
 17. Theapparatus of claim 1, wherein the pre-processing engine is configured topre-process two or more of the blocks in parallel.
 18. A computerprogram product for decoding data, the computer program productcomprising: a tangible storage medium readable by a processing circuitand storing instructions for execution by the processing circuit forperforming a method comprising: receiving a data stream, the data streamencoded by an encoding algorithm and transmitted as a plurality ofvariable length symbols; dividing the data stream into a sequence ofblocks, each block having a sequence of adjacent bit positions startinga first bit position and ending with a last bit position; pre-processingeach block prior to fully decoding each block, wherein pre-processingincludes, for each block, selecting a bit position in a current blockand determining a starting position of a first symbol in an adjacentblock based on the selected bit position, wherein determining isinitially performed for the last bit position in the current block, andis repeated sequentially for each preceding bit position through andincluding the first bit position; and fully decoding each block bydecoding a first block starting at the first bit position and decodingeach adjacent block starting at the starting position.
 19. The computerprogram product of claim 18, wherein determining the starting positionincludes identifying a symbol and determining the starting positionbased on a length of the symbol, and storing the starting position in atable indexed to the current block and the selected bit position. 20.The computer program product of claim 19, wherein determining thestarting position includes: determining the length of the identifiedsymbol that would begin at the selected bit position; calculating aposition of a following symbol by adding the length of the identifiedsymbol to the selected bit position; responsive to the position of thefollowing symbol being in the adjacent block, recording the position asthe starting position in the table; and responsive to the position ofthe following symbol being in the selected block, reading the startingposition of the first symbol in the next block from an entry in thetable corresponding to the position, and recording the starting positionin the table.